package com.tengju.bff.interfaces.shared;

public enum  InterfaceCode {

    SYSTEM_ERROR(10000, "系统异常"),
    NOT_LOGIN(10001, "请先登录"),
    TOKEN_OVERDUE(10002,"token失效"),
    PWD_CHANGE_FAIL(10003, "密码变更失败"),
    USER_NOT_EXIST(10004, "用户不存在"),
    ARTICLE_NOT_EXIST(10005, "文章不存在"),
    ID_CODE_MOBILE_NOT_MATCH(10006, "手机号与idCode不匹配"),
    INSUFFICIENT_AUTHORITY(10007,"权限不足"),
    CHIEF_CLUB_ERROR(10008,"总监俱乐部查询失败"),
    ACTIVITY_CONFIG_ERROR(10009,"活动配置错误"),


    LIMIT_HEIGHT(20001,"图片高度超过限制高度: %s"),
    LIMIT_WIDTH(20002,"图片宽度超过限制宽度: %s"),
    LIMIT_SIZE(20003,"文件大小超过限制大小: %s"),

    ORDER_COLUMN_ERROR(20004,"排序字段不存在: %s"),

    STRING_NOT_CONVERT_TO_LONG_LIST(40001,"列表中含有非法字符, 请认真审查！"),
    DATA_NOT_EXIST(40002,"数据不存在 ！"),

    DATETIME_BETWEEN_ILLEGAL(50001,"所选的时间范围应小于2个月 ！"),
    DATETIME_ILLEGAL(50002,"日期数据出现异常 ！"),
    DATA_ILLEGAL(50003,"数据出现异常:%s"),

    ACTIVITY_NOT_EXIST(60001, "活动不存在: %s"),
    BANK_CARD_TYPE_ILLEGAL(70001, "银行卡账户类型非法[1:对公账户, 3:个人账户]: %s"),
    VALID_ACCOUNT_QUERY_ERROR(70002, "获取鉴权信息: 查询用户银行账户信息异常, idCode: %s"),
    PING_AN_VALID_BIND_CARD_ERROR(70003, "平安绑卡鉴权异常, req: %s"),
    DEP_ACCOUNT_NOT_OPEN(70004,"请先开户绑卡"),
    DEP_CARD_TYPE_EMPTY(70005,"请选择账户类型"),



    //over charge相关code迁移
    PARAM_ERROR(55200000, "参数错误"),
    RESUBMIT(55200001, "重复提交，请重新再试"),
    SYS_ERROR(55200002, "系统错误"),
    BUSINESS_ERROR(55200003, "业务校验异常 %s"),

    BUSINESS_DATA_NULL(55200004, "业务数据为空"),
    BUSINESS_EXCEPTION(55200005, "业务处理异常"),
    BUSINESS_FAIL(55200006, "业务处理失败"),
    DATA_IS_NULL(55200007, "数据不存在"),
    ACC_BUSINESS_EXCEPTION(55200008, "处理账户核心结算异常"),
    SER_BUSINESS_EXCEPTION(55200009, "处理服务费账户结算异常"),
    PROFIT_BUSINESS_EXCEPTION(55200010, "收益结算业务处理异常"),
    EXC_BUSINESS_DEAL_DATA(55200011, "超过业务处理数据量"),




    ;

    private int code;
    private String msg;

    InterfaceCode(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

    public String getMessage(Object... param) {
        return String.format(msg, param);
    }
}
